package cn.stylefeng.guns.sys.modular.system.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.sys.modular.system.entity.Huopei;
import cn.stylefeng.guns.sys.modular.system.model.HuopeiDto;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;

public interface HuopeiService extends IService<Huopei> {
    /**
     * 导入excel
     * @param fileName
     * @param file
     * @return
     * @throws Exception
     */
    Boolean batchImport(String fileName, MultipartFile file) throws Exception;

    Object listExport(String dm, Date date);

    /**
     * 导出excel
     * @param request
     * @param response
     * @param shopName
     * @param beginTime
     * @param shopCode
     * @return
     */
    ResponseEntity<byte[]> exportExcel(HttpServletRequest request, HttpServletResponse response,
                                       String shopName, Date beginTime, String shopCode, String date);

    /**
     * 查询列表
     * @param huopei
     * @return
     */
//    List<Huopei> huopeiList(Huopei huopei, String timeLimit);
    LayuiPageInfo huopeiList(Huopei huopei, String timeLimit);

    Huopei getByShopCode(String shopCode, Date beginTime);

    /**
     * 货赔表详细
     * @param huopei
     * @return
     */
    List<Huopei> getHuopei(Huopei huopei, String date);

    List<Huopei> exportHuopei(Huopei huopei, String date);

//    void editHuopei(Map map);

//    void editHuopei(Huopei huopei, CaiwuPankui pankui);

    ResponseData editHuopei(HuopeiDto huopeiDto);


    /**
     * 查询该会计名下的所有店铺
     * @param name
     * @return
     */
    List dmList(String name);

    List kjList(String name);


//    LayuiPageInfo list(List dm, Date beginTime, Date endTime);

    LayuiPageInfo list(List dm, String timeLimit);


    /**
     * 查询店长的店铺
     * @param name
     * @return
     */
    List dzList(String name);

    List listDz(String name);

    /**
     * 审核
     * @param huopei
     * @return
     */
    int audit(Huopei huopei);

    /**
     * 会计通知店长提交完成
     * @param huopei
     */
    int remind(Huopei huopei);


}
